package com.edu.app.service.impl.linkservices;

import com.edu.app.bean.core.SysCustomer;
import com.edu.app.bean.linkbeans.SysCustomerLesson;
import com.edu.app.mapper.linkmappers.SysCustomerLessonMapper;
import com.edu.app.model.CustomerLessonModel;

import com.edu.app.service.impl.SysBaseServiceImpl;
import com.edu.app.service.sys.linkservices.SysCustomerLessonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysCustomerLessonServiceImpl extends SysBaseServiceImpl<SysCustomerLesson,SysCustomerLessonMapper> implements SysCustomerLessonService {

    @Autowired
    private SysCustomerLessonMapper sysCustomerLessonMapper;



    @Override
    public List<SysCustomerLesson> getLessonByCustomerId(Integer id){

        List<SysCustomerLesson> sysCustomerLessonList = sysCustomerLessonMapper.getLessonByCustomerId(id);
        return sysCustomerLessonList;
    }

    @Override
    public List<SysCustomer> getCustomerByLessonId(Integer id){

        List<SysCustomer> sysCustomerList = sysCustomerLessonMapper.getCustomerByLessonId(id);
        return sysCustomerList;
    }

    @Override
    public List<CustomerLessonModel> getCustomerLessonModelByCusId(Integer id){
        List<CustomerLessonModel> customerLessonModelList = sysCustomerLessonMapper.getCustomerLessonModelByCusId(id);
        return customerLessonModelList;
    }

    @Override
    public SysCustomerLesson getCustomerLesson(Integer cutomer_id, Integer lesson_id){
        return sysCustomerLessonMapper.getCustomerLesson(cutomer_id, lesson_id);
    }

    @Override
    public Integer deleteCustomerLessonByLessonId(Integer lesson_id){
        return sysCustomerLessonMapper.deleteCustomerLessonByLessonId(lesson_id);
    }

    @Override
    public Integer deleteCustomerLessonByCustomerId(Integer customer_id){
        return sysCustomerLessonMapper.deleteCustomerLessonByCustomerId(customer_id);
    }
}
